<include file="public@header"/>
<style type="text/css">
    .cardBox {
        width: 250px;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
        text-align: center;
        float: left;
        margin-right: 10px;
        padding: 5px;
        padding-top: 15px;
    }

    .headerBox {
        color: #fff;
        padding: 10px;
        font-size: 15px;
        height: 180px;
    }

    .bodyBox {
        padding: 10px;
    }

    .bodyBox p {
        margin-left: 5px;
    }
</style>

</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a>备用金</a></li>
        <li><a href="{:url('add')}">新增款项</a></li>
    </ul>
    <form method="post" class="js-ajax-form margin-top-20">


        <div class="cardBox" style="margin-bottom: 60px">
            <div class="headerBox" style="background-color: #006fc4;">
                <p>
                    备用金进账总额 : {$all}
                </p>
                <p>
                    备用金累计支付 :
                    <?php
                                    $som = $sums + $expen;
                                    echo $som;
                                ?>
                </p>
                <p>
                    备用金累计结余 : <?php
                                    $sec = $all - $sums-$expen;
                                    echo $sec;
                                ?>
                </p>
            </div>
        </div>
        <div class="cardBox" style="margin-bottom: 60px">
            <div class="headerBox" style="background-color: #006fc4;">
                <p>
                   《公司内部开销》
                </p>
                <p>
                    备用金累计支付 : {$expen}
                </p>
            </div>
        </div>

        <volist name="pec" id="po">
            <div class="cardBox" style="margin-bottom: 90px">
                <div class="headerBox" style="background-color: #006fc4;">
                    <p>
                        项目 : {$po.name}
                    </p>
                    <p>
                        备用金进账总额 : {$po.price}
                    </p>
                    <p>
                        备用金流水已支付 : {$po.back}
                    </p>
                    <p>
                        备用金生活费支付 :{$po.life}
                    </p>
                    <p>
                        备用金结余 : {$po.brance}
                    </p>
                </div>
            </div>
        </volist>


        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>时间</th>
                <th>支付方式</th>
                <th>收款人</th>
                <th>事件</th>
                <th>金额</th>
                <th>单位</th>
                <th>所属项目</th>
                <th>备注</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="data" item="v">
                <tr>
                    <td>{$v.date}</td>
                    <td>
                        <?php
                            if($v['pay'] == 1){
                            echo '微信';
                        }elseif($v['pay'] == 2){
                            echo '支付宝';
                        }elseif($v['pay'] == 3){
                            echo '银行卡';
                        }elseif($v['pay'] == 4){
                            echo '现金';
                        }
                        ?>
                    </td>
                    <td>{$v.payee}</td>
                    <td>{$v.desc}</td>
                    <td><span style="color: red">{$v.price}</span></td>
                    <td>{$v.unit}</td>
                    <td>{$v.engine}</td>
                    <td>{$v['title']}</td>

                    <td>
                        <a class="btn btn-xs btn-primary js-ajax-submit"
                           href="{:url('edit',array('id'=>$v['id']))}">编辑</a>
                        <a class="btn btn-xs btn-danger js-ajax-delete"
                           href="{:url('del',array('id'=>$v['id']))}">删除</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>

    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>